tools/libxl: Fixes to libxl__domain_set_paging_mempool_size()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 18 Nov 2022 16:53:45 +0000 (16:53 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 21 Nov 2022 16:12:41 +0000 (16:12 +0000)
commit8746d3e2550b142cd751ca7a041a38789a020d2b
treea5bfbd79c629b083ccf40a9b6bf5f986d3f2ac7d
parent8cdfbf95b19c01fbb741c41d5ea5a94f8823964c
tools/libxl: Fixes to libxl__domain_set_paging_mempool_size()

The error message accidentally printed the bytes value as if it were kB.

Furthermore, both b_info.shadow_memkb and shadow_mem are uint64_t, meaning
there is a risk of overflow if the user specified a stupidly large value in
the vm.cfg file.  Check and reject such a condition.

Fixes: 7c3bbd940dd8 ("xen/arm, libxl: Revert XEN_DOMCTL_shadow_op; use p2m mempool hypercalls")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
tools/libs/light/libxl_dom.c